<?php

namespace DesignNew\Memento;

require('../vendor/autoload.php');

class MemClient
{
    public function __construct()
    {
        $this->run();
    }

    public function run()
    {
        $editor = new Editor();

        $editor->type("This is the first sentence");
        $editor->type("This is second");

        $saved = $editor->save();
        $editor->type("And this is third");

        echo $editor->getContent();
        $editor->restore($saved);

        echo $editor->getContent();
    }
}

$client = new MemClient();